Skip to content

Add sphinx project name and version#523

Merged
codingjoe merged 1 commit intomasterfrom
docs
Dec 19, 2025
Merged

Add sphinx project name and version#523
codingjoe merged 1 commit intomasterfrom
docs

Conversation

@codingjoe
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings December 19, 2025 13:01
@codingjoe codingjoe self-assigned this Dec 19, 2025
@codingjoe codingjoe merged commit 4324b71 into master Dec 19, 2025
7 checks passed
@codingjoe codingjoe deleted the docs branch December 19, 2025 13:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Sphinx documentation configuration by setting the project name, version, and release information. The changes import the health_check module to extract version details from its VERSION tuple and version string attribute.

  • Adds project name, version, and release configuration to Sphinx docs
  • Imports health_check module to access version information dynamically
  • Constructs short version string from VERSION tuple (major.minor format)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/conf.py
@@ -1,2 +1,7 @@
import health_check

project = "Django HealthCheck"
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project name "Django HealthCheck" is inconsistent with the project's established naming convention. Throughout the codebase (README.md, docs/index.rst, pyproject.toml), the project is consistently referred to as "django-health-check". Consider using "django-health-check" instead to maintain consistency with the project's branding and documentation.

Suggested change
project = "Django HealthCheck"
project = "django-health-check"

Copilot uses AI. Check for mistakes.
Comment thread docs/conf.py
import health_check

project = "Django HealthCheck"
version = f"{health_check.VERSION[0]}.{health_check.VERSION[1]}"
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accessing VERSION tuple elements by index without validation could fail if the version tuple has fewer than 2 elements. While setuptools_scm typically generates version tuples with at least major and minor components, it's safer to handle edge cases. Consider adding validation or using a more defensive approach, such as checking the tuple length first or using try-except to handle potential IndexError.

Suggested change
version = f"{health_check.VERSION[0]}.{health_check.VERSION[1]}"
version_info = getattr(health_check, "VERSION", None)
if isinstance(version_info, (tuple, list)) and len(version_info) >= 2:
version = f"{version_info[0]}.{version_info[1]}"
else:
version = getattr(health_check, "__version__", "")

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants